#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2025/4/15 15:52
# @Author  : Chenmm
# @File    : SysUserNotice.py
# @Software: PyCharm

from app import db
from datetime import datetime


class SysUserNotice(db.Model):
    __tablename__ = 'sys_user_notice'

    id = db.Column(db.BigInteger, primary_key=True, autoincrement=True, comment='id')
    notice_id = db.Column(db.BigInteger, nullable=False, comment='通知ID')
    user_id = db.Column(db.BigInteger, nullable=False, comment='用户ID')
    is_read = db.Column(db.SmallInteger, default=0, comment='读取状态')
    read_time = db.Column(db.DateTime, comment='阅读时间')
    create_time = db.Column(db.DateTime, default=datetime.now, nullable=False, comment='创建时间')
    update_time = db.Column(db.DateTime, onupdate=datetime.now, comment='更新时间')
    is_deleted = db.Column(db.SmallInteger, default=0, comment='逻辑删除')

    __table_args__ = {'comment': '用户通知公告表'}